package com.controller;

import com.model.Student;
import com.service.impl.StudentServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by CHUMI on 2017/7/6.
 */
@Controller
@RequestMapping("/StudentController")
public class StudentController {
    @Autowired
    StudentServiceImpl studentService;
  //测试Student    通过studentId 找到 学生所有信息
    @RequestMapping("/selectStudent/{id}")
    @ResponseBody
    public List<Student> selectStudent(@PathVariable("id") Integer id){
        return studentService.selectStudent(id);
    }
}
